<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" href="Public/Css/style.css" />
		<link rel="stylesheet" href="Public/Css/validform.css" />
		<link rel="stylesheet" href="Public/Css/uploadify.css" />
		<link rel="stylesheet" href="Public/Css/imgareaselect-animated.css" />
		<title>login page</title>
	</head>
	<body>
		<fieldset class="login_fieldset">
			<legend>login</legend>
			<div>
				<form class="login_form" action="zkf_tool.php?s=login_form" method="post">
					<input type="hidden" name="lock" value="<?=md5('zkf'.md5(ZKF::time()))?>" />
					<input type="hidden" name="lockey" value="<?=md5(ZKF::time())?>" />
					<div class="login_div"><label class="login_label">username：</label><input class="login_input" type="text" name="username" value="aaaa"/><span class="Validform_checktip"></span></div>
					<div class="login_div"><label class="login_label">password：</label><input class="login_input" type="password" name="password"  value="aaaqqq"/><span class="Validform_checktip"></span></div>
					<div class="login_div">
						<label class="login_label">verify：</label>
						<input class="login_input_verify" type="text" name="verify" />
						<img class="login_verify" s="verify" src="zkf_tool.php?s=verify" />
						<span><a class="login_verify_text" s="verify" href="javascript:void(0);">看不清楚？點擊更換</a></span>
						<span class="Validform_checktip"></span>
					</div>
					<div class="login_div"><input class="login_submit" type="submit" value="submit" /><input class="login_reset" type="reset" value="reset"/></div>
				</form>
			</div>
		</fieldset>
		
<script type="text/javascript" src="Public/Js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="Public/Js/Validform_v5.3.2_min.js"></script>

<script type="text/javascript">
$(function(){
	var vf = $(".login_form").Validform({
		tiptype:3,
		ajaxPost:true,
		callback:function(data){
			if(data.status=="y"){
				setTimeout(function(){
					$.Hidemsg();//公用方法关闭信息提示框;显示方法是$.Showmsg("message goes here.");
					window.location.href="index.php"; 
				},1000);
			}
		}
	});
	vf.addRule([{
		ele:"[name='username']",
		datatype:"*",
		nullmsg:"用户名不能为空！",
		sucmsg:' ',
	},{
		ele:"[name='password']",
		datatype:"*",
		nullmsg:"密码不能为空！",
		sucmsg:' '
	},{
		ele:"[name='verify']",
		datatype:"s1-6",
		ajaxurl:"zkf_tool.php?s=check_verify",
		nullmsg:"請輸入驗證碼！",
		errormsg:"驗證碼錯誤！",
		sucmsg:' ',
	}]);
	/////////////////////////////////////////
	$("[s='verify']").click(function(){
		$(".login_verify").attr('src','zkf_tool.php?s=verify&'+Math.random());
	});
});
</script>
	</body>
</html>